#ifndef ENDPOINT_H
#define ENDPOINT_H
#include <QDialog>

#include "digitalkeyboard.h"
#include "slamrouteplanning.h"

namespace Ui {
class EndPoint;
}

class EndPoint : public QDialog {
  Q_OBJECT

 public:
  explicit EndPoint(QWidget* parent = nullptr);
  ~EndPoint();

  void readConfig();
  int getSelectPoint() const;
  int getSelectRoute() const;
  bool isSetRoute();
  //  bool isForward();
  SlamRoutePlanning::RouteType routeType();

 private slots:
  void on_comboBox_currentIndexChanged(int index);

  void on_comboBox_2_currentIndexChanged(int index);

  void on_QDialogButtonBox_ok_clicked();

  void on_pushButton_cancle_clicked();

  void on_pushButton_open_digikeybord_clicked();

 private:
  Ui::EndPoint* ui;
  QStringList gxlist;
  QList<QList<QString>> xblist;
  QList<QList<QPair<int, SlamRoutePlanning::RouteType>>> endptlist;
  int selectgx = 0;
  int selectpt = 0;
  int selectroute = 0;
  bool is_set_route = false;
  //  bool forward = true;

  SlamRoutePlanning::RouteType route_type{SlamRoutePlanning::NORMAL};
};

#endif  // ENDPOINT_H
